class RelationRecommend < ActiveRecord::Base
  attr_accessible :osp_id, :relative_osp_id, :weight
  
  belongs_to :open_source_project, :foreign_key => "osp_id"
  belongs_to :open_source_project, :foreign_key => "relative_osp_id"
  def self.getTableName(osp_id)
    a = osp_id.to_i % 100
    #a = osp_id - (osp_id.to_i/100 * 100)
    targetTableName = 'relation_recommends_' + a.to_s
    return targetTableName
  end
end
